package com.example.tang.zhayan.utils;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.widget.ImageView;

import com.example.tang.zhayan.R;

import org.xutils.image.ImageOptions;

/**
 * Created by tang on 2015/12/14.
 */
public class ImgOptionsUtils {
    private static ImageOptions options = null;

    public static ImageOptions getOptions() {
        if (options == null) {
            options = new ImageOptions.Builder()
                    .setLoadingDrawableId(R.mipmap.default_loader_image1)
                    .setFailureDrawableId(R.mipmap.default_loader_image1)
                    .setImageScaleType(ImageView.ScaleType.CENTER)
                    .build();
        }
        return options;
    }

}
